/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package project1;

import java.util.ArrayList;

/**
 *
 * @author maciej
 */
public class Object3D {
    private double x;
    private double y;
    private double z;
    private double h;
    private double w;
    private double d;
    public Object3D(double x, double y, double z, double h, double w, double d){
        this.x = x;
        this.y = y;
        this.z = z;
        this.h = h;
        this.w = w;
        this.d = d;
    }
    
    public ArrayList<Line3D> getObject3D(){
        ArrayList<Line3D> list = new ArrayList<Line3D>();
        list.add(new Line3D(new Point3D(x, y, z), new Point3D(x, y, z+d)));
        list.add(new Line3D(new Point3D(x, y, z), new Point3D(x+w, y, z)));
        list.add(new Line3D(new Point3D(x, y, z), new Point3D(x, y+h, z)));
        list.add(new Line3D(new Point3D(x, y, z+d), new Point3D(x, y+h, z+d)));
        list.add(new Line3D(new Point3D(x, y, z+d), new Point3D(x+w, y, z+d)));
        list.add(new Line3D(new Point3D(x+w, y, z), new Point3D(x+w, y+h, z)));
        list.add(new Line3D(new Point3D(x+w, y, z), new Point3D(x+w, y, z+d)));
        list.add(new Line3D(new Point3D(x, y+h, z), new Point3D(x+w, y+h, z)));
        list.add(new Line3D(new Point3D(x, y+h, z), new Point3D(x, y+h, z+d)));
        list.add(new Line3D(new Point3D(x+w, y+h, z+d), new Point3D(x, y+h, z+d)));
        list.add(new Line3D(new Point3D(x+w, y+h, z+d), new Point3D(x+w, y, z+d)));
        list.add(new Line3D(new Point3D(x+w, y+h, z+d), new Point3D(x+w, y+h, z)));
        return list;
    }
}
